package com.woniu.liuzhougov.itemAndTask.service.impl;

import com.woniu.liuzhougov.itemAndTask.dao.SupervisionMapper;
import com.woniu.liuzhougov.itemAndTask.pojo.Supervision;
import com.woniu.liuzhougov.itemAndTask.service.SupervisionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wyz02
 * @version 1.0
 * @ClassName SupervisionServiceImpl
 * @Description: TODO
 * @date 2019/4/29 11:09
 */
@Service
public class SupervisionServiceImpl implements SupervisionService {

    @Autowired
    private SupervisionMapper supervisionMapper;
    /*
    **
     * @Author Wuyuzhong
     * @Description 按派发人查询督办单
     * @Date 2019/4/29 11:09
     * @Param [fouderId]
     * @return java.util.List<com.woniu.liuzhougov.itemAndTask.pojo.Supervision>
     **/
    @Override
    public List<Supervision> searchByFounder(Integer fouderId) {
        return supervisionMapper.searchByFounderId(fouderId);
    }

    /*
    **
     * @Author Wuyuzhong
     * @Description 按执行人查询督办单
     * @Date 2019/4/29 11:10
     * @Param [userId]
     * @return java.util.List<com.woniu.liuzhougov.itemAndTask.pojo.Supervision>
     **/
    @Override
    public List<Supervision> searchByReciever(Integer userId) {
        return supervisionMapper.searchByWorkerId(userId);
    }
}
